package com.eBook.entity;
/**
 * 小说实体
 * */
public class Book {
	private int bookId;
	private String bookName;
	private int bookType;
	private String bookWrite;
	private String bookImg;
	private String bookUrl;
	private String bookDesc;
	private int bookLike;
	public Book() {
		super();
	}
	public Book(int bookId, String bookName, int bookType, String bookWrite,
			String bookImg, String bookUrl, String bookDesc, int bookLike) {
		super();
		this.bookId = bookId;
		this.bookName = bookName;
		this.bookType = bookType;
		this.bookWrite = bookWrite;
		this.bookImg = bookImg;
		this.bookUrl = bookUrl;
		this.bookDesc = bookDesc;
		this.bookLike = bookLike;
	}
	public int getBookId() {
		return bookId;
	}
	public void setBookId(int bookId) {
		this.bookId = bookId;
	}
	public String getBookName() {
		return bookName;
	}
	public void setBookName(String bookName) {
		this.bookName = bookName;
	}
	public int getBookType() {
		return bookType;
	}
	public void setBookType(int bookType) {
		this.bookType = bookType;
	}
	public String getBookWrite() {
		return bookWrite;
	}
	public void setBookWrite(String bookWrite) {
		this.bookWrite = bookWrite;
	}
	public String getBookImg() {
		return bookImg;
	}
	public void setBookImg(String bookImg) {
		this.bookImg = bookImg;
	}
	public String getBookUrl() {
		return bookUrl;
	}
	public void setBookUrl(String bookUrl) {
		this.bookUrl = bookUrl;
	}
	public String getBookDesc() {
		return bookDesc;
	}
	public void setBookDesc(String bookDesc) {
		this.bookDesc = bookDesc;
	}
	public int getBookLike() {
		return bookLike;
	}
	public void setBookLike(int bookLike) {
		this.bookLike = bookLike;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((bookDesc == null) ? 0 : bookDesc.hashCode());
		result = prime * result + bookId;
		result = prime * result + ((bookImg == null) ? 0 : bookImg.hashCode());
		result = prime * result + bookLike;
		result = prime * result
				+ ((bookName == null) ? 0 : bookName.hashCode());
		result = prime * result + bookType;
		result = prime * result + ((bookUrl == null) ? 0 : bookUrl.hashCode());
		result = prime * result
				+ ((bookWrite == null) ? 0 : bookWrite.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Book other = (Book) obj;
		if (bookDesc == null) {
			if (other.bookDesc != null)
				return false;
		} else if (!bookDesc.equals(other.bookDesc))
			return false;
		if (bookId != other.bookId)
			return false;
		if (bookImg == null) {
			if (other.bookImg != null)
				return false;
		} else if (!bookImg.equals(other.bookImg))
			return false;
		if (bookLike != other.bookLike)
			return false;
		if (bookName == null) {
			if (other.bookName != null)
				return false;
		} else if (!bookName.equals(other.bookName))
			return false;
		if (bookType != other.bookType)
			return false;
		if (bookUrl == null) {
			if (other.bookUrl != null)
				return false;
		} else if (!bookUrl.equals(other.bookUrl))
			return false;
		if (bookWrite == null) {
			if (other.bookWrite != null)
				return false;
		} else if (!bookWrite.equals(other.bookWrite))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "Book [bookId=" + bookId + ", bookName=" + bookName
				+ ", bookType=" + bookType + ", bookWrite=" + bookWrite
				+ ", bookImg=" + bookImg + ", bookUrl=" + bookUrl
				+ ", bookDesc=" + bookDesc + ", bookLike=" + bookLike + "]";
	}
	
}
